π¨ Refactor internals + bump deps (post-audit cleanup)#13
Merged
Conversation
Five internals smells from the 2026-05-13 audit, bundled for one release: - server: host:port via net.JoinHostPort (correct IPv6 bracketing) - path: hoist slash-run regex to package-level var (no per-call compile) - config: drop bespoke envref cache (re-reads override each call) - logger: Log/Pipe varβfunc for writer-injection in tests - show: collapse ip internal/node into makeIPCmd factory; --raw moved to ShowCmd.PersistentFlags() (inherited by every leaf) Also bumps the Go directive to 1.26.2 and refreshes go.mod/go.sum dependencies. Version β 0.0.55.
The go.mod directive is now 1.26.2. Bump actions/setup-go to 1.26.x on both jobs and golangci-lint to v2.12.2 (first line built with go1.26) so the pre-commit lint hook can target the module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Story
2026-q2-15-ws-cli-refactorsβ five internals smells from Nelson's 2026-05-13 audit, bundled for one release.Refactors
host:portvianet.JoinHostPort(correct IPv6 bracketing); extractedformatAddrfor testability.cacheMu/cachedPath/cachedVal/cachedErr) dropped entirely;LoadEnvReference()re-reads each call (dissolves the 2026-q2.12 stale-cache finding).Log/Pipevarβfunc;cmd/logtests rewritten to writer-injection.ip internal/ip nodecollapsed into amakeIPCmdfactory taking afunc() (string, error)getter;--rawmoved toShowCmd.PersistentFlags()(inherited by every leaf).Also
1.25.8 β 1.26.2;go.mod/go.sumdependency refresh (bundled per maintainer decision).0.0.55.Surface
Β§11 frozen surface unchanged β no subcommand rename, no exit-code or stderr-text change. Sole delta:
show env β¦ --rawno longer errorsunknown flag(inherited-but-ignored; intended, pinned byTestShow_RawFlagInheritedByAllLeaves).go vet ./...,go build ./...,go test ./...all clean.